package chapterTwo.casting;

public class Exec {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
	 
		
		Dog d= new Dog();
		d.move();
		Animal a =d;
		a.move();
		Animal m=(Animal)d;
		m.move();
		Animal ad =(Animal) new Dog();
		ad.move();
		Animal atd = new Animal();
		atd.move();
		Pet p=new Animal();
		p.beFriendly();
		Pet pd=new Dog();
		pd.beFriendly();
		Pet ptd=new Dog();
		((Dog) ptd).move();
		
		System.out.println(new String[]{"Malika","Rachid","Zaina","Otman"}[1]);
		
		
	}

}
